package com.zayats.dal;

import java.util.List;

import org.springframework.dao.EmptyResultDataAccessException;

import com.zayats.exceptions.DataAccessDbException;
import com.zayats.exceptions.FamilyNotExistsException;
import com.zayats.model.Family;
import com.zayats.model.User;

public interface FamilyRepository {
	
	public boolean createFamily(String name, String username) throws DataAccessDbException;
	
	public List<Family> getFamiliesForUser(String username);
	
	public boolean assignFamilyToUser(int familyId, String username);
	
	public boolean deleteUserFromFamily(String username, int familyId);

	public List<User> getParticipans(int familyId) throws EmptyResultDataAccessException, FamilyNotExistsException;
	
	public List<Family> getAllFamiliesForUser(String username);
	
	public boolean deleteFamily(int familyId) throws DataAccessDbException;
}
